package com.lvmama.rhino.entrance

import java.text.SimpleDateFormat
import java.util.Calendar

import com.lvmama.rhino.analyze.client._
import com.lvmama.rhino.common.utils.Utils


object Main {
  def main(args: Array[String]) {
    val a = Some(555)
    val A = a.getOrElse("a")
    val B = a.getOrElse("aa")
    println(A.getClass)
    println(B)




    if(None.isDefined){
      println("----")
    }

    val fruit = List("apple", "orange", "peach", "banana")
//    println(fruit.apply("apple"))
//    println(fruit.contains("apple"))
//    println(fruit("apple"))
    val  nfruit = fruit ++ List("111")
    println(nfruit)
    println(fruit)

    val a1 = Array(1,2,3)
    val a2 = a1.map(_*3)
    println(a1.toString)
    for(x<-a1){
      print(x)
    }
    println("")
    for(x<-a2){
      print(x)
    }


//    val cal: Calendar = Calendar.getInstance()
//    cal.add(Calendar.DATE, -1)
//    cal.set(Calendar.HOUR, 0)
//    cal.set(Calendar.HOUR_OF_DAY, 0)
//    cal.set(Calendar.MINUTE, 0)
//    cal.set(Calendar.SECOND, 0)
//    //    print(cal.getTime)
//    //    Utils.getBetweenDate()
//    var path = "2018/05/04-2018/05/17"
//    val times: Array[String] = path.split("-")
//    val start = times.apply(0)
//    val end = times.apply(1)
//    val simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd")
//    val startTime = simpleDateFormat.parse(start)
//    val endTime = simpleDateFormat.parse(end)
//    var tims = Utils.getBetweenDate(startTime, endTime)
//    for (i <- tims) {
//      println(i)
//    }
//    print(Utils.getBetweenDate(startTime, endTime).size)
//
//    val jobs: Option[String] => Unit = {
//      case Some("VIPTempJob") => VIPTemp(if (args.length >= 2) args(1) else Utils.getYesterday("yyyy/MM/dd") + "-" + Utils.getYesterday("yyyy/MM/dd"))
//
//      case _ => println("rhino pipeline no job to execute !!!!!!!")
//    }
//    jobs(Option[String](args.head))
  }
}
